Change in openvpn[master]: Add t_server_null test suite
A message that is not in the archive (sent off-list or not yet received): gerrit.1717758396000.I1b54da258c7d15551b6c3de7522a0d19afdb66de@...2715...
Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
to review the following change.
Change subject: Add t_server_null test suite
......................................................................
Add t_server_null test suite
---
M .gitignore
A doc/t_server_null.rst
M tests/Makefile.am
A tests/null_client_up.sh
A tests/t_server_null.rc-sample
A tests/t_server_null.sh
A tests/t_server_null_client.sh
A tests/t_server_null_default.rc
A tests/t_server_null_server.sh
A tests/t_server_null_stress.sh
10 files changed, 566 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/63/663/1
.gitignore +1 -0
@@ -55,6 +55,7 @@ tests/t_client.sh tests/t_client-*-20??????-??????/ +tests/t_server_null.rc t_client.rc t_client_ips.rc tests/unit_tests/**/*_testdriver
doc/t_server_null.rst new file +146 -0
146 lines not on this page · raw message
tests/Makefile.am +9 -2
@@ -15,10 +15,10 @@ SUBDIRS = unit_tests AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) System Tests' -LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver if !WIN32 -test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh +test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh t_server_null.sh check_PROGRAMS = ntlm_support if HAVE_SITNL
@@ -27,6 +27,7 @@ endif TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)" +TEST_EXTENSIONS = .sh TESTS = $(test_scripts) dist_noinst_SCRIPTS = \
@@ -34,8 +35,14 @@ t_cltsrv-down.sh \ t_lpback.sh \ t_net.sh \ + t_server_null.sh \ + t_server_null_client.sh \ + t_server_null_server.sh \ + t_server_null_default.rc \ update_t_client_ips.sh +t_client.log: t_server_null.log + dist_noinst_DATA = \ t_client.rc-sample
tests/null_client_up.sh new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +# +# Stop the parent process (openvpn) gracefully after a small delay + +# Determine the OpenVPN PID from its pid file. This works reliably even when +# the OpenVPN process is backgrounded for parallel tests. +MY_PPID=`cat $pid` + +# Allow OpenVPN to finish initializing while waiting in the background and then +# killing the process gracefully. +(sleep 5 ; kill -15 $MY_PPID) &
tests/t_server_null.rc-sample new file +15 -0
@@ -0,0 +1,15 @@ +# Uncomment to run tests with sudo +#SUDO_EXEC=`which sudo` +#RUN_SUDO="${SUDO_EXEC} -E" + +TEST_RUN_LIST="1 2 3 10 11" + +TEST_NAME_10="t_server_null_client.sh-openvpn_2_6_8_udp" +SHOULD_PASS_10="yes" +CLIENT_EXEC_10="/usr/sbin/openvpn" +CLIENT_CONF_10="${CLIENT_CONF_BASE} --remote 127.0.0.1 1194 udp --proto udp" + +TEST_NAME_11="t_server_null_client.sh-openvpn_2_6_8_tcp" +SHOULD_PASS_11="yes" +CLIENT_EXEC_11="/usr/sbin/openvpn" +CLIENT_CONF_11="${CLIENT_CONF_BASE} --remote 127.0.0.1 1195 tcp --proto tcp"
tests/t_server_null.sh new file +74 -0
74 lines not on this page · raw message
tests/t_server_null_client.sh new file +132 -0
132 lines not on this page · raw message
tests/t_server_null_default.rc new file +66 -0
66 lines not on this page · raw message
tests/t_server_null_server.sh new file +80 -0
80 lines not on this page · raw message
tests/t_server_null_stress.sh new file +32 -0
@@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# +# Run this stress test as root to avoid sudo authorization from timing out. + +count=0 + +. ./t_server_null_default.rc + +export pid_files="" +for SUF in $TEST_SERVER_LIST +do + eval server_name=\"\$SERVER_NAME_$SUF\" + pid_files="${pid_files} ./${server_name}.pid" +done + +LOG_BASEDIR="make-check" +mkdir -p "${LOG_BASEDIR}" + +while [ $count -lt 100 ]; do + count=$(( count + 1 )) + make check TESTS=t_server_null.sh SUBDIRS= > /dev/null 2>&1 + retval=$? + + echo "Iteration ${count}: return value ${retval}" >> "${LOG_BASEDIR}/make-check.log" + if [ $retval -ne 0 ]; then + DIR="${LOG_BASEDIR}/make-check-${count}" + mkdir -p "${DIR}" + cp t_server_null*.log "${DIR}/" + cp test-suite.log "${DIR}/" + ps aux|grep openvpn|grep -vE '(suppress|grep)' > "${DIR}/psaux" + fi +done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1b54da258c7d15551b6c3de7522a0d19afdb66de
Gerrit-Change-Number: 663
Gerrit-PatchSet: 1
Gerrit-Owner: mattock <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: mattock, plaisthos.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/663?usp=email )
Change subject: Add t_server_null test suite
......................................................................
Patch Set 1: Code-Review-2
(2 comments)
File tests/t_server_null_client.sh:
http://gerrit.openvpn.net/c/openvpn/+/663/comment/923993f1_1319ae66 :
PS1, Line 1: #!/usr/bin/env bash
bash is not necessarily available on BSD.
http://gerrit.openvpn.net/c/openvpn/+/663/comment/54cb0bde_ba12a5e5 :
PS1, Line 74: # Wait until servers are up. This check is based on the presence of processes This check does not work correctly. You often see something like this in the output of the test:
cat: t_server_null_server-1194_udp.pid: No such file or directory
cat: t_server_null_server-1195_tcp.pid: No such file or directory
error: list of process IDs must follow -p
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
OpenVPN test servers up: 0/0
Does not necessarily fail the test but definitely does not do what it is supposed to do.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1b54da258c7d15551b6c3de7522a0d19afdb66de
Gerrit-Change-Number: 663
Gerrit-PatchSet: 1
Gerrit-Owner: mattock <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: mattock <[email protected]...>
Gerrit-Comment-Date: Fri, 07 Jun 2024 11:36:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: mattock, plaisthos.
Hello flichtenheld, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
to look at the new patch set (#2).
Change subject: Add t_server_null test suite
......................................................................
Add t_server_null test suite
---
M .gitignore
A doc/t_server_null.rst
M tests/Makefile.am
A tests/null_client_up.sh
A tests/t_server_null.rc-sample
A tests/t_server_null.sh
A tests/t_server_null_client.sh
A tests/t_server_null_default.rc
A tests/t_server_null_server.sh
A tests/t_server_null_stress.sh
10 files changed, 568 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/63/663/2
.gitignore +1 -0
@@ -55,6 +55,7 @@ tests/t_client.sh tests/t_client-*-20??????-??????/ +tests/t_server_null.rc t_client.rc t_client_ips.rc tests/unit_tests/**/*_testdriver
doc/t_server_null.rst new file +147 -0
147 lines not on this page · raw message
tests/Makefile.am +9 -2
@@ -15,10 +15,10 @@ SUBDIRS = unit_tests AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) System Tests' -LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver if !WIN32 -test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh +test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh t_server_null.sh check_PROGRAMS = ntlm_support if HAVE_SITNL
@@ -27,6 +27,7 @@ endif TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)" +TEST_EXTENSIONS = .sh TESTS = $(test_scripts) dist_noinst_SCRIPTS = \
@@ -34,8 +35,14 @@ t_cltsrv-down.sh \ t_lpback.sh \ t_net.sh \ + t_server_null.sh \ + t_server_null_client.sh \ + t_server_null_server.sh \ + t_server_null_default.rc \ update_t_client_ips.sh +t_client.log: t_server_null.log + dist_noinst_DATA = \ t_client.rc-sample
tests/null_client_up.sh new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +# +# Stop the parent process (openvpn) gracefully after a small delay + +# Determine the OpenVPN PID from its pid file. This works reliably even when +# the OpenVPN process is backgrounded for parallel tests. +MY_PPID=`cat $pid` + +# Allow OpenVPN to finish initializing while waiting in the background and then +# killing the process gracefully. +(sleep 5 ; kill -15 $MY_PPID) &
tests/t_server_null.rc-sample new file +15 -0
@@ -0,0 +1,15 @@ +# Uncomment to run tests with sudo +#SUDO_EXEC=`which sudo` +#RUN_SUDO="${SUDO_EXEC} -E" + +TEST_RUN_LIST="1 2 3 10 11" + +TEST_NAME_10="t_server_null_client.sh-openvpn_2_6_8_udp" +SHOULD_PASS_10="yes" +CLIENT_EXEC_10="/usr/sbin/openvpn" +CLIENT_CONF_10="${CLIENT_CONF_BASE} --remote 127.0.0.1 1194 udp --proto udp" + +TEST_NAME_11="t_server_null_client.sh-openvpn_2_6_8_tcp" +SHOULD_PASS_11="yes" +CLIENT_EXEC_11="/usr/sbin/openvpn" +CLIENT_CONF_11="${CLIENT_CONF_BASE} --remote 127.0.0.1 1195 tcp --proto tcp"
tests/t_server_null.sh new file +72 -0
72 lines not on this page · raw message
tests/t_server_null_client.sh new file +136 -0
136 lines not on this page · raw message
tests/t_server_null_default.rc new file +66 -0
66 lines not on this page · raw message
tests/t_server_null_server.sh new file +78 -0
78 lines not on this page · raw message
tests/t_server_null_stress.sh new file +33 -0
@@ -0,0 +1,33 @@ +#!/usr/bin/env sh +# +# Run this stress test as root to avoid sudo authorization from timing out. + +ITERATIONS="${1:-100}" + +. ./t_server_null_default.rc + +export pid_files="" +for SUF in $TEST_SERVER_LIST +do + eval server_name=\"\$SERVER_NAME_$SUF\" + pid_files="${pid_files} ./${server_name}.pid" +done + +LOG_BASEDIR="make-check" +mkdir -p "${LOG_BASEDIR}" + +count=0 +while [ $count -lt $ITERATIONS ]; do + count=$(( count + 1 )) + make check TESTS=t_server_null.sh SUBDIRS= > /dev/null 2>&1 + retval=$? + + echo "Iteration ${count}: return value ${retval}" >> "${LOG_BASEDIR}/make-check.log" + if [ $retval -ne 0 ]; then + DIR="${LOG_BASEDIR}/make-check-${count}" + mkdir -p "${DIR}" + cp t_server_null*.log "${DIR}/" + cp test-suite.log "${DIR}/" + ps aux|grep openvpn|grep -vE '(suppress|grep)' > "${DIR}/psaux" + fi +done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1b54da258c7d15551b6c3de7522a0d19afdb66de
Gerrit-Change-Number: 663
Gerrit-PatchSet: 2
Gerrit-Owner: mattock <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: mattock <[email protected]...>
Gerrit-MessageType: newpatchset
Attention is currently required from: mattock, plaisthos.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/663?usp=email )
Change subject: Add t_server_null test suite
......................................................................
Patch Set 2: -Code-Review
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1b54da258c7d15551b6c3de7522a0d19afdb66de
Gerrit-Change-Number: 663
Gerrit-PatchSet: 2
Gerrit-Owner: mattock <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: mattock <[email protected]...>
Gerrit-Comment-Date: Wed, 12 Jun 2024 09:23:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: mattock, plaisthos.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/663?usp=email )
Change subject: Add t_server_null test suite
......................................................................
Patch Set 2: Code-Review+2
(2 comments)
File tests/t_server_null_client.sh:
http://gerrit.openvpn.net/c/openvpn/+/663/comment/995176b3_cae59746 :
PS1, Line 1: #!/usr/bin/env bash
Quoted 1 line
bash is not necessarily available on BSD.
Done
http://gerrit.openvpn.net/c/openvpn/+/663/comment/0e0d21a2_a852e248 :
PS1, Line 74: # Wait until servers are up. This check is based on the presence of processes
Quoted 1 line
This check does not work correctly. You often see something like this in the output of the test: […]
Done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1b54da258c7d15551b6c3de7522a0d19afdb66de
Gerrit-Change-Number: 663
Gerrit-PatchSet: 2
Gerrit-Owner: mattock <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: mattock <[email protected]...>
Gerrit-Comment-Date: Thu, 13 Jun 2024 07:57:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: flichtenheld <[email protected]...>
Gerrit-MessageType: comment
PATCH v2 1/1 Add t_server_null test suite
In reply to a message not in the archiveFrom: Samuli Seppänen <[email protected]...>
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/663
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>
.gitignore +1 -0
@@ -55,6 +55,7 @@ tests/t_client.sh tests/t_client-*-20??????-??????/ +tests/t_server_null.rc t_client.rc t_client_ips.rc tests/unit_tests/**/*_testdriver
doc/t_server_null.rst new file +147 -0
147 lines not on this page · raw message
tests/Makefile.am +9 -2
@@ -15,10 +15,10 @@ SUBDIRS = unit_tests AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) System Tests' -LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver if !WIN32 -test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh +test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh t_server_null.sh check_PROGRAMS = ntlm_support if HAVE_SITNL
@@ -27,6 +27,7 @@ endif TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)" +TEST_EXTENSIONS = .sh TESTS = $(test_scripts) dist_noinst_SCRIPTS = \
@@ -34,8 +35,14 @@ t_cltsrv-down.sh \ t_lpback.sh \ t_net.sh \ + t_server_null.sh \ + t_server_null_client.sh \ + t_server_null_server.sh \ + t_server_null_default.rc \ update_t_client_ips.sh +t_client.log: t_server_null.log + dist_noinst_DATA = \ t_client.rc-sample
tests/null_client_up.sh new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +# +# Stop the parent process (openvpn) gracefully after a small delay + +# Determine the OpenVPN PID from its pid file. This works reliably even when +# the OpenVPN process is backgrounded for parallel tests. +MY_PPID=`cat $pid` + +# Allow OpenVPN to finish initializing while waiting in the background and then +# killing the process gracefully. +(sleep 5 ; kill -15 $MY_PPID) &
tests/t_server_null.rc-sample new file +15 -0
@@ -0,0 +1,15 @@ +# Uncomment to run tests with sudo +#SUDO_EXEC=`which sudo` +#RUN_SUDO="${SUDO_EXEC} -E" + +TEST_RUN_LIST="1 2 3 10 11" + +TEST_NAME_10="t_server_null_client.sh-openvpn_2_6_8_udp" +SHOULD_PASS_10="yes" +CLIENT_EXEC_10="/usr/sbin/openvpn" +CLIENT_CONF_10="${CLIENT_CONF_BASE} --remote 127.0.0.1 1194 udp --proto udp" + +TEST_NAME_11="t_server_null_client.sh-openvpn_2_6_8_tcp" +SHOULD_PASS_11="yes" +CLIENT_EXEC_11="/usr/sbin/openvpn" +CLIENT_CONF_11="${CLIENT_CONF_BASE} --remote 127.0.0.1 1195 tcp --proto tcp"
tests/t_server_null.sh new file +72 -0
72 lines not on this page · raw message
tests/t_server_null_client.sh new file +136 -0
136 lines not on this page · raw message
tests/t_server_null_default.rc new file +66 -0
66 lines not on this page · raw message
tests/t_server_null_server.sh new file +78 -0
78 lines not on this page · raw message
tests/t_server_null_stress.sh new file +33 -0
@@ -0,0 +1,33 @@ +#!/usr/bin/env sh +# +# Run this stress test as root to avoid sudo authorization from timing out. + +ITERATIONS="${1:-100}" + +. ./t_server_null_default.rc + +export pid_files="" +for SUF in $TEST_SERVER_LIST +do + eval server_name=\"\$SERVER_NAME_$SUF\" + pid_files="${pid_files} ./${server_name}.pid" +done + +LOG_BASEDIR="make-check" +mkdir -p "${LOG_BASEDIR}" + +count=0 +while [ $count -lt $ITERATIONS ]; do + count=$(( count + 1 )) + make check TESTS=t_server_null.sh SUBDIRS= > /dev/null 2>&1 + retval=$? + + echo "Iteration ${count}: return value ${retval}" >> "${LOG_BASEDIR}/make-check.log" + if [ $retval -ne 0 ]; then + DIR="${LOG_BASEDIR}/make-check-${count}" + mkdir -p "${DIR}" + cp t_server_null*.log "${DIR}/" + cp test-suite.log "${DIR}/" + ps aux|grep openvpn|grep -vE '(suppress|grep)' > "${DIR}/psaux" + fi +done
[Openvpn-devel] [PATCH applied] Re: Add t_server_null test suite
I have not tested this yet, just looked at a few details - we've discussed using @SHELL@ to get a known-working shell, which is more likely to succeed than assuming "#!/usr/bin/env" will exist, or that the "sh" it finds will be useful (Solaris, I'm looking at you...). Also, documenting that scripts do not properly get waited for does not make it a feature...
But anyway. Let's move onwards, and improve iteratively.
Your patch has been applied to the master branch.
commit 06c7ce5d1fc3b17e0da731d22002e58b9e2d4994
Author: Samuli Seppänen Date: Thu Jun 13 10:14:22 2024 +0200
Add t_server_null test suite
Signed-off-by: Samuli Seppänen <[email protected]...>
Acked-by: Frank Lichtenheld <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg28750.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
PATCH v2 1/1 Add t_server_null test suite
In reply to a message not in the archive---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/663
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>
.gitignore +1 -0
@@ -55,6 +55,7 @@ tests/t_client.sh tests/t_client-*-20??????-??????/ +tests/t_server_null.rc t_client.rc t_client_ips.rc tests/unit_tests/**/*_testdriver
doc/t_server_null.rst new file +147 -0
147 lines not on this page · raw message
tests/Makefile.am +9 -2
@@ -15,10 +15,10 @@ SUBDIRS = unit_tests AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) System Tests' -LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver if !WIN32 -test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh +test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh t_server_null.sh check_PROGRAMS = ntlm_support if HAVE_SITNL
@@ -27,6 +27,7 @@ endif TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)" +TEST_EXTENSIONS = .sh TESTS = $(test_scripts) dist_noinst_SCRIPTS = \
@@ -34,8 +35,14 @@ t_cltsrv-down.sh \ t_lpback.sh \ t_net.sh \ + t_server_null.sh \ + t_server_null_client.sh \ + t_server_null_server.sh \ + t_server_null_default.rc \ update_t_client_ips.sh +t_client.log: t_server_null.log + dist_noinst_DATA = \ t_client.rc-sample
tests/null_client_up.sh new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +# +# Stop the parent process (openvpn) gracefully after a small delay + +# Determine the OpenVPN PID from its pid file. This works reliably even when +# the OpenVPN process is backgrounded for parallel tests. +MY_PPID=`cat $pid` + +# Allow OpenVPN to finish initializing while waiting in the background and then +# killing the process gracefully. +(sleep 5 ; kill -15 $MY_PPID) &
tests/t_server_null.rc-sample new file +15 -0
@@ -0,0 +1,15 @@ +# Uncomment to run tests with sudo +#SUDO_EXEC=`which sudo` +#RUN_SUDO="${SUDO_EXEC} -E" + +TEST_RUN_LIST="1 2 3 10 11" + +TEST_NAME_10="t_server_null_client.sh-openvpn_2_6_8_udp" +SHOULD_PASS_10="yes" +CLIENT_EXEC_10="/usr/sbin/openvpn" +CLIENT_CONF_10="${CLIENT_CONF_BASE} --remote 127.0.0.1 1194 udp --proto udp" + +TEST_NAME_11="t_server_null_client.sh-openvpn_2_6_8_tcp" +SHOULD_PASS_11="yes" +CLIENT_EXEC_11="/usr/sbin/openvpn" +CLIENT_CONF_11="${CLIENT_CONF_BASE} --remote 127.0.0.1 1195 tcp --proto tcp"
tests/t_server_null.sh new file +72 -0
72 lines not on this page · raw message
tests/t_server_null_client.sh new file +136 -0
136 lines not on this page · raw message
tests/t_server_null_default.rc new file +66 -0
66 lines not on this page · raw message
tests/t_server_null_server.sh new file +78 -0
78 lines not on this page · raw message
tests/t_server_null_stress.sh new file +33 -0
@@ -0,0 +1,33 @@ +#!/usr/bin/env sh +# +# Run this stress test as root to avoid sudo authorization from timing out. + +ITERATIONS="${1:-100}" + +. ./t_server_null_default.rc + +export pid_files="" +for SUF in $TEST_SERVER_LIST +do + eval server_name=\"\$SERVER_NAME_$SUF\" + pid_files="${pid_files} ./${server_name}.pid" +done + +LOG_BASEDIR="make-check" +mkdir -p "${LOG_BASEDIR}" + +count=0 +while [ $count -lt $ITERATIONS ]; do + count=$(( count + 1 )) + make check TESTS=t_server_null.sh SUBDIRS= > /dev/null 2>&1 + retval=$? + + echo "Iteration ${count}: return value ${retval}" >> "${LOG_BASEDIR}/make-check.log" + if [ $retval -ne 0 ]; then + DIR="${LOG_BASEDIR}/make-check-${count}" + mkdir -p "${DIR}" + cp t_server_null*.log "${DIR}/" + cp test-suite.log "${DIR}/" + ps aux|grep openvpn|grep -vE '(suppress|grep)' > "${DIR}/psaux" + fi +done
cron2 has uploaded a new patch set (#3) to the change originally created by mattock. ( http://gerrit.openvpn.net/c/openvpn/+/663?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld
Change subject: Add t_server_null test suite
......................................................................
Add t_server_null test suite
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg28750.html
---
M .gitignore
A doc/t_server_null.rst
M tests/Makefile.am
A tests/null_client_up.sh
A tests/t_server_null.rc-sample
A tests/t_server_null.sh
A tests/t_server_null_client.sh
A tests/t_server_null_default.rc
A tests/t_server_null_server.sh
A tests/t_server_null_stress.sh
10 files changed, 568 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/63/663/3
.gitignore +1 -0
@@ -55,6 +55,7 @@ tests/t_client.sh tests/t_client-*-20??????-??????/ +tests/t_server_null.rc t_client.rc t_client_ips.rc tests/unit_tests/**/*_testdriver
doc/t_server_null.rst new file +147 -0
147 lines not on this page · raw message
tests/Makefile.am +9 -2
@@ -15,10 +15,10 @@ SUBDIRS = unit_tests AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) System Tests' -LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver if !WIN32 -test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh +test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh t_server_null.sh check_PROGRAMS = ntlm_support if HAVE_SITNL
@@ -27,6 +27,7 @@ endif TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)" +TEST_EXTENSIONS = .sh TESTS = $(test_scripts) dist_noinst_SCRIPTS = \
@@ -34,8 +35,14 @@ t_cltsrv-down.sh \ t_lpback.sh \ t_net.sh \ + t_server_null.sh \ + t_server_null_client.sh \ + t_server_null_server.sh \ + t_server_null_default.rc \ update_t_client_ips.sh +t_client.log: t_server_null.log + dist_noinst_DATA = \ t_client.rc-sample
tests/null_client_up.sh new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +# +# Stop the parent process (openvpn) gracefully after a small delay + +# Determine the OpenVPN PID from its pid file. This works reliably even when +# the OpenVPN process is backgrounded for parallel tests. +MY_PPID=`cat $pid` + +# Allow OpenVPN to finish initializing while waiting in the background and then +# killing the process gracefully. +(sleep 5 ; kill -15 $MY_PPID) &
tests/t_server_null.rc-sample new file +15 -0
@@ -0,0 +1,15 @@ +# Uncomment to run tests with sudo +#SUDO_EXEC=`which sudo` +#RUN_SUDO="${SUDO_EXEC} -E" + +TEST_RUN_LIST="1 2 3 10 11" + +TEST_NAME_10="t_server_null_client.sh-openvpn_2_6_8_udp" +SHOULD_PASS_10="yes" +CLIENT_EXEC_10="/usr/sbin/openvpn" +CLIENT_CONF_10="${CLIENT_CONF_BASE} --remote 127.0.0.1 1194 udp --proto udp" + +TEST_NAME_11="t_server_null_client.sh-openvpn_2_6_8_tcp" +SHOULD_PASS_11="yes" +CLIENT_EXEC_11="/usr/sbin/openvpn" +CLIENT_CONF_11="${CLIENT_CONF_BASE} --remote 127.0.0.1 1195 tcp --proto tcp"
tests/t_server_null.sh new file +72 -0
72 lines not on this page · raw message
tests/t_server_null_client.sh new file +136 -0
136 lines not on this page · raw message
tests/t_server_null_default.rc new file +66 -0
66 lines not on this page · raw message
tests/t_server_null_server.sh new file +78 -0
78 lines not on this page · raw message
tests/t_server_null_stress.sh new file +33 -0
@@ -0,0 +1,33 @@ +#!/usr/bin/env sh +# +# Run this stress test as root to avoid sudo authorization from timing out. + +ITERATIONS="${1:-100}" + +. ./t_server_null_default.rc + +export pid_files="" +for SUF in $TEST_SERVER_LIST +do + eval server_name=\"\$SERVER_NAME_$SUF\" + pid_files="${pid_files} ./${server_name}.pid" +done + +LOG_BASEDIR="make-check" +mkdir -p "${LOG_BASEDIR}" + +count=0 +while [ $count -lt $ITERATIONS ]; do + count=$(( count + 1 )) + make check TESTS=t_server_null.sh SUBDIRS= > /dev/null 2>&1 + retval=$? + + echo "Iteration ${count}: return value ${retval}" >> "${LOG_BASEDIR}/make-check.log" + if [ $retval -ne 0 ]; then + DIR="${LOG_BASEDIR}/make-check-${count}" + mkdir -p "${DIR}" + cp t_server_null*.log "${DIR}/" + cp test-suite.log "${DIR}/" + ps aux|grep openvpn|grep -vE '(suppress|grep)' > "${DIR}/psaux" + fi +done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1b54da258c7d15551b6c3de7522a0d19afdb66de
Gerrit-Change-Number: 663
Gerrit-PatchSet: 3
Gerrit-Owner: mattock <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/663?usp=email )
Change subject: Add t_server_null test suite
......................................................................
Add t_server_null test suite
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg28750.html
---
M .gitignore
A doc/t_server_null.rst
M tests/Makefile.am
A tests/null_client_up.sh
A tests/t_server_null.rc-sample
A tests/t_server_null.sh
A tests/t_server_null_client.sh
A tests/t_server_null_default.rc
A tests/t_server_null_server.sh
A tests/t_server_null_stress.sh
10 files changed, 568 insertions(+), 2 deletions(-)
.gitignore +1 -0
@@ -55,6 +55,7 @@ tests/t_client.sh tests/t_client-*-20??????-??????/ +tests/t_server_null.rc t_client.rc t_client_ips.rc tests/unit_tests/**/*_testdriver
doc/t_server_null.rst new file +147 -0
147 lines not on this page · raw message
tests/Makefile.am +9 -2
@@ -15,10 +15,10 @@ SUBDIRS = unit_tests AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) System Tests' -LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver if !WIN32 -test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh +test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh t_server_null.sh check_PROGRAMS = ntlm_support if HAVE_SITNL
@@ -27,6 +27,7 @@ endif TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)" +TEST_EXTENSIONS = .sh TESTS = $(test_scripts) dist_noinst_SCRIPTS = \
@@ -34,8 +35,14 @@ t_cltsrv-down.sh \ t_lpback.sh \ t_net.sh \ + t_server_null.sh \ + t_server_null_client.sh \ + t_server_null_server.sh \ + t_server_null_default.rc \ update_t_client_ips.sh +t_client.log: t_server_null.log + dist_noinst_DATA = \ t_client.rc-sample
tests/null_client_up.sh new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +# +# Stop the parent process (openvpn) gracefully after a small delay + +# Determine the OpenVPN PID from its pid file. This works reliably even when +# the OpenVPN process is backgrounded for parallel tests. +MY_PPID=`cat $pid` + +# Allow OpenVPN to finish initializing while waiting in the background and then +# killing the process gracefully. +(sleep 5 ; kill -15 $MY_PPID) &
tests/t_server_null.rc-sample new file +15 -0
@@ -0,0 +1,15 @@ +# Uncomment to run tests with sudo +#SUDO_EXEC=`which sudo` +#RUN_SUDO="${SUDO_EXEC} -E" + +TEST_RUN_LIST="1 2 3 10 11" + +TEST_NAME_10="t_server_null_client.sh-openvpn_2_6_8_udp" +SHOULD_PASS_10="yes" +CLIENT_EXEC_10="/usr/sbin/openvpn" +CLIENT_CONF_10="${CLIENT_CONF_BASE} --remote 127.0.0.1 1194 udp --proto udp" + +TEST_NAME_11="t_server_null_client.sh-openvpn_2_6_8_tcp" +SHOULD_PASS_11="yes" +CLIENT_EXEC_11="/usr/sbin/openvpn" +CLIENT_CONF_11="${CLIENT_CONF_BASE} --remote 127.0.0.1 1195 tcp --proto tcp"
tests/t_server_null.sh new file +72 -0
72 lines not on this page · raw message
tests/t_server_null_client.sh new file +136 -0
136 lines not on this page · raw message
tests/t_server_null_default.rc new file +66 -0
66 lines not on this page · raw message
tests/t_server_null_server.sh new file +78 -0
78 lines not on this page · raw message
tests/t_server_null_stress.sh new file +33 -0
@@ -0,0 +1,33 @@ +#!/usr/bin/env sh +# +# Run this stress test as root to avoid sudo authorization from timing out. + +ITERATIONS="${1:-100}" + +. ./t_server_null_default.rc + +export pid_files="" +for SUF in $TEST_SERVER_LIST +do + eval server_name=\"\$SERVER_NAME_$SUF\" + pid_files="${pid_files} ./${server_name}.pid" +done + +LOG_BASEDIR="make-check" +mkdir -p "${LOG_BASEDIR}" + +count=0 +while [ $count -lt $ITERATIONS ]; do + count=$(( count + 1 )) + make check TESTS=t_server_null.sh SUBDIRS= > /dev/null 2>&1 + retval=$? + + echo "Iteration ${count}: return value ${retval}" >> "${LOG_BASEDIR}/make-check.log" + if [ $retval -ne 0 ]; then + DIR="${LOG_BASEDIR}/make-check-${count}" + mkdir -p "${DIR}" + cp t_server_null*.log "${DIR}/" + cp test-suite.log "${DIR}/" + ps aux|grep openvpn|grep -vE '(suppress|grep)' > "${DIR}/psaux" + fi +done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/663?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1b54da258c7d15551b6c3de7522a0d19afdb66de
Gerrit-Change-Number: 663
Gerrit-PatchSet: 3
Gerrit-Owner: mattock <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged